import { Blue } from "./Blue";
import { Color } from "./Color";
import { Red } from "./Red";

export class ColorFactory {
    paint(name: string): Color | null {
        switch (name) {
            case "blue":
                return new Blue();
            case "red":
                return new Red();
            default:
                return null;
        }
    }
}